library(rClr)
clrInit()
setRDotNet(TRUE)

library(testthat)
context("rClrTestCases")

cTypename <- "Rclr.TestCases"

clrCallStatic(cTypename, "CreateStringDictionary")
clrCallStatic(cTypename, "CreateObjectDictionary")

fname = 'F:/codeplex/r2clr/testing/CreateRdnObjects/CreateRdnObjects/bin/Debug/CreateRdnObjects.dll'
clrLoadAssembly(fname)
tests = clrNew('CreateRdnObjects.RdotnetObjFactory,CreateRdnObjects')
dconv = clrCallStatic('Rclr.ClrFacade,ClrFacade', 'get_DataConverter')

clrReflect(dconv)

# engine = clrCall(dconv, 'GetEngine') # <-- fails, but why??

clrCall(tests, 'GetREngine', dconv)
a = clrCall(tests, 'CreateGenericVector')
a
a = clrCall(tests, 'CreateDataFrameWithStrings')
a

adf <- data.frame(individual = letters[1:10], value=1:10)
inspectArgs(adf, adf)
inspectArgs(blah = adf)
objtype = clrCall(tests, 'CheckObjectType', adf)

